﻿using Microsoft.AspNetCore.Builder.Extensions;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Warehouse.IServices.TESinterface;
using Warehouse.Services.TESinterface;
using Warehouse.ViewModels.TESinterfaceDTO;
using WCS.Entities.Api;
using WCS.Entities.TES;
using WCS.IServices;
using WCS.ViewModels.AGVDTO;

namespace JuionWareHouse.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class TESController : ControllerBase
    {
        private readonly IPsCarServices PS;
        private readonly MapOptions map;
        private readonly IDeviceManager _deviceManager;
        public TESController(IPsCarServices PS)
        {
            this.PS = PS;
            this.map = new MapOptions();
        }

        [HttpPost]
        public IActionResult PreOccupyStation(FeederSitesDTO model)
        {
            return Ok(PS.preOccupyStation(model));
        }

        [HttpPost]
        public IActionResult OccupyStation(Salver model)
        {
            return Ok(PS.occupyStation(model));
        }

        [HttpPost]
        public IActionResult NewMovePodTask(IanewayDTO model)
        {
            return Ok(PS.newMovePodTask(model));
        }

        [HttpPost]
        public IActionResult ReleaseStation(ContainerDTO model)
        {
            return Ok(PS.releaseStation(model));
        }

        [HttpPost]
        public IActionResult NewMovePodTasks(DispatchHandlingDTO model)
        {
            return Ok(PS.newMovePodTasks(model));
        }

        [HttpPost]
        public IActionResult GetStorageLaneList(GetStorageLaneListDTO model)
        {
            return Ok(PS.getStorageLaneList(model));
        }

        [HttpPost]
        public IActionResult GetStorageLaneDetail(GetStorageLaneDetailDTO model)
        {
            return Ok(PS.getStorageLaneDetail(model));
        }
        //[HttpPost]
        //public ApiResult GetJob(string jobnumber, int zhan, string kuwei)
        //{
        //    return ApiResultHelp.Success("完成");
        //}
    }
}
